-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
APP-2280 Add @viamrobotics/prime-core package #282
APP-2280 Add @viamrobotics/prime-core package #282
Conversation
c14f644
to
db4aff5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fantastic to me! Got some random package management nits and thoughts, but otherwise LGTM!
(Except for that publishConfig
comment, which is needed or else the first publish will fail)
.github/workflows/ci.yml
Outdated
with: | ||
name: npm-core-dist | ||
path: packages/core/dist | ||
- name: Publish @viamrobotics/prime-core 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For followup work, it may be worth switching from JS-DevTools/npm-publish
to pnpm publish --recursive
. This would let us publish everything in one go (if a package's version is not yet published) with some added niceties, like copying a root LICENSE
file into all published packages
packages/core/vite.config.ts
Outdated
plugins: [sveltekit()], | ||
test: { | ||
include: ['src/**/*.{test,spec}.{js,ts}'], | ||
globals: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than setting globals: true
, we can set up a vitest.setup.ts
file to install @testing-library/jest-dom
and configure the testing-library reset. I softly prefer it to globals mode which feels to me like a silly holdover from pre-module times
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
abbbbc8
to
5da9b0f
Compare
510412e
to
0ad645d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, might be a little (unharmful) weirdness remaining in the legacy ESLint config because of course there is it's ESLint
with: | ||
node-version: 18 | ||
- name: Download npm artifacts | ||
node-version: 16 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Node 16 is EOL'ing in a few months; was this change intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope - copy pasta
@@ -8,7 +10,10 @@ module.exports = { | |||
parserOptions: { | |||
tsConfigRootDir: __dirname, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this casing correct?
tsConfigRootDir: __dirname, | |
tsconfigRootDir: __dirname, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was not! Great catch.
path.join(__dirname, './tsconfig.json'), | ||
path.join(__dirname, './playground/tsconfig.json'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These path.join
's shouldn't be required; might be related to casing comment above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately the casing did not affect the need for the path.join
s. Leaving as-is.
@@ -67,6 +63,7 @@ | |||
"@typescript-eslint/parser": "^5.59.0", | |||
"@viamrobotics/eslint-config": "^0.0.4", | |||
"@viamrobotics/prettier-config": "^0.0.1", | |||
"@viamrobotics/prime-core": "workspace:../core", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh duh, hadn't considered that we'd added a workspace
dependency. This makes our usage of pnpm publish -r
required rather than "nice to have" (to replace workspace
deps with the actual versions).
Glad you took care of that!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just added this dependency so we could share the theme across packages, but we didn't do that when you first reviewed. It's much better now anyways!
This adds a new
@viamrobotics/prime-core
package to PRIME. The package is a SvelteKit component library.Change log
npm create svelte@latest core
Testing
Badge
testsReview requests
Please try to pull down the branch and see if you can use the component in your own local work. Instructions are in the README.